#ifndef PROTO_H
#define PROTO_H

#include <stdint.h>

#include "sitetypes.h"

#define	CHNMAX		200
#define CHNID_MIN	0
#define CHNID_MAX	(CHNMAX-1)
#define CHNID_LIST	255

#define	DEFAULT_RCVPORT	"8765"
#define	DEFAULT_MGROUP	"224.2.2.2"

#define DESCMAX 128

#define PATHMAX	2048

#define DATAMAX	1024

struct chn_entry_st {
	chnid_t chnid;
	uint8_t desc[DESCMAX];
};

struct msg_st {
	chnid_t	chnid;
	union {
		struct {
			uint8_t byte[1];
		} data;
		struct {
			struct chn_entry_st entry[1];
		} chn_list;
	} un;
};

#endif

